package com.itedge.solutionmanager.taskdata.impl.solution;

import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;
import javax.persistence.Version;
import javax.validation.constraints.Size;

import org.springframework.format.annotation.DateTimeFormat;

import com.itedge.infrastructure.taskdata.impl.AbstractTaskDataEntity;

@Entity
@Table(name="SOLUTION_IMPL_TASK_DATA")
public class SolutionDeliveryTaskData extends AbstractTaskDataEntity {
	
	@Id
    @GeneratedValue(strategy = GenerationType.AUTO)
    @Column(name = "id")
    private Long id;	

	@Version
    @Column(name = "version")
    private Integer version;
	
	@Column(name ="DELIVERY_NOTES")
	@Size(max = 4000)
	private String deliveryNotes;

	@Column(name="DELIVERY_DATE")
    @Temporal(TemporalType.TIMESTAMP)
	@DateTimeFormat(iso = DateTimeFormat.ISO.DATE)
    private Date deliveryDate;
	
	@Column(name="TIME_SPENT")
    private Long timeSpent;		

	public Date getDeliveryDate() {
		return deliveryDate;
	}

	public void setDeliveryDate(Date deliveryDate) {
		this.deliveryDate = deliveryDate;
	}

	public Long getTimeSpent() {
		return timeSpent;
	}

	public void setTimeSpent(Long timeSpent) {
		this.timeSpent = timeSpent;
	}

	@Override
	public Long getId() {
        return this.id;
    }

	public void setId(Long id) {
        this.id = id;
    }	

	@Override
	public Integer getVersion() {
        return this.version;
    }

	@Override
	public void setVersion(Integer version) {
        this.version = version;
    }
	
	public void setDeliveryNotes(String deliveryNotes) {
		this.deliveryNotes = deliveryNotes;
	}
	
	public String getDeliveryNotes() {
		return this.deliveryNotes;
	}
}